<%@ page session="false" language="java" contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>日常保养</title>

	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0"/>
	
	<!-- bootstrap and fontawesome css-->
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/bootstrap.css"/>
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/font-awesome.css"/>
	
	<!--page specific plugin styles  -->
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/jquery-ui.css"/>
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/bootstrap-datepicker3.css"/>
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/ui.jqgrid.css"/>
	
	<!--text fonts  -->
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/ace-fonts.css"/>
	
	<!-- ace styles -->
	<link rel="stylesheet" href="${contextPath}/resources/assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style"/>
	<!--[if lte IE 9]>
			<link rel="stylesheet" href="${contextPath}/resources/assets/css/ace-part2.css" class="ace-main-stylesheet" />
		<![endif]-->
    <!--[if lte IE 9]>
		  <link rel="stylesheet" href="${contextPath}/resources/assets/css/ace-ie.css" />
		<![endif]-->
		
    <!-- ace settings handler -->
    <script src="${contextPath}/resources/assets/js/ace-extra.js"></script>
    <script type="text/javascript">
        window.jQuery || document.write("<script src='${contextPath}/resources/assets/js/jquery.js'>" + "<" + "/script>");
    </script>



	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  <style>
        .seari_logo {
            padding-left: 10px;
            color: #ffffff;
            font-size: 20px;
            text-shadow: none;
            font-weight: 600;
            line-height: 80px;
        }
        
        .seari_logo:hover,
        .seari_logo:focus {
            color: #ffffff;
            text-decoration: none;
        }
        
        .navbar {
            min-height: 80px;
            background: url('${contextPath}/resources/img/navbar-bg.png') repeat-x;
        }
        
        .navbar .navbar-nav > li {
            border: 0px solid rgba(0, 0, 0, 0);
        }
        
        .navbar .navbar-nav > li > a {
            padding-top: 18px;
        }
        
        @media only screen and (max-width: 991px) {
            .navbar-nav {
                float: left;
                margin: 0;
            }
            .navbar-nav > li {
                float: left;
            }
            .navbar-menu-min .navbar-nav > li > a > .menu-title {
                /*display: none;*/
            }
            .seari_logo,.seari_user {
                display: none;
            }
            .navbar-menu{
                background-color: #607990;
            }
        }
        
        .navbar-menu {
            padding-top: 20px;
            
        }
        
        .menu-title {
            font: 16px/1.5 'Microsoft YaHei', SimSun;
        }
        
        .page-content {
            font: 12px/20px "Microsoft YaHei";
        }
        
        .sidebar {
            font-family: "Microsoft YaHei";
        }
        
        .breadcrumb {
            font-family: "Microsoft YaHei";
        }
        /****box design style*****/
        
        .box {
            float: left;
            box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
            display: block;
            background-color: #fff;
        }
        
        .london {
            border-top: 7px solid #19beb6;
        }
        
        .paris {
            border-top: 7px solid #df9801;
        }
        
        .box-icon {
            width: 100%;
            position: relative;
        }
        
        .info-nav-container {
            width: 32%;
            margin-right: 3%;
        }
        
        .float-container {
            overflow: auto;
        }
        
        .info {
            width: 100%;
            padding: 15px 30px 20px;
            font-size: 16px;
        }
        
        .info-description-container {
            padding: 20px 30px;
            float: right;
            width: 65%;
        }
        
        .london-title {
            padding: 0 0 0 5px;
            border-left: 2px solid #19beb6;
            margin: 25px 0px;
        }
        
        .london-title h2 {
            color: #19beb6;
            font: 24px/1.5 'Microsoft YaHei';
            margin: 5px;
        }
        
        .paris-title {
            border-left: 2px solid #df9801;
        }
        
        .paris-title h2 {
            color: #df9801;
            font: 24px/1.5 'Microsoft YaHei';
        }
        
        #webglcanvas {
				position: absolute;
				top: 0;
				left: 0;
				height: 100%;
				width: 100%;
				z-index: 0;
			}
    </style>
  
  <body class="no-skin">
  	<jsp:include page="index.jsp" flush="true"></jsp:include>
  	<!-- /section:basic/navbar.layout -->
  	<div class="main-container" id="main-container">
  		<!-- section:basic/sidebar -->
  		<div id="sidebar" class="sidebar responsive">
  			<script type="text/javascript">
  				try{
  					ace.settings.check('sidebar','fixed')
  				} catch(e){}
  			</script>
  			
  			<ul class="nav nav-list">
            	<li class="">
                    <a href="#" class="dropdown-toggle">
                        <i class="menu-icon fa fa-tag"></i>
                        <span class="menu-text"> 控制管理 </span>
                    </a>
                    <b class="arrow"></b>
                    
                     <ul class="submenu">
                            	<li class="">
                            		<a href="jkgl">
                            			控制方式一
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="sbxk">
                            			控制方式二
                            		</a>
                            	</li>
                      </ul>
                </li>
                <li class="">
                    <a href="#" class="dropdown-toggle">
                        <i class="menu-icon fa fa-tag"></i>
                        <span class="menu-text"> 养护维修 </span>
                    </a>
                    <b class="arrow"></b>
                    
                    <ul class="submenu">
                    	<li class="">
                    	    <a href="sbgl">
                    	        <i class="menu-icon fa fa-caret-right"></i>设备管理
                    	    </a>
                    	    <b class="arrow"></b>
                    	</li>
                        <li class="">
                            <a href="" class="dropdown-toggle">
                                <i class="menu-icon fa fa-caret-right"></i> 日常保养
                            </a>
                            <b class="arrow"></b>
                            <ul class="submenu">
                            	<li class="">
                            		<a href="byjh">
                            			保养计划
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="zxjh">
                            			执行计划
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="byjl">
                            			保养记录
                            		</a>
                            	</li>
                            </ul>
                        </li>
                        <li class="">
                            <a href="" class="dropdown-toggle">
                                <i class="menu-icon fa fa-caret-right"></i> 设备维修
                            </a>
                            <b class="arrow"></b>
                            <ul class="submenu">
                            	<li class="">
                            		<a href="wxsq">
                            			维修申请
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="zxwx">
                            			执行维修
                            		</a>
                            	</li>
                            	<li class="">
                            		<a href="wxjl">
                            			维修记录
                            		</a>
                            	</li>
                            </ul>
                        </li>
                    </ul>
                </li>  
                <li class="active">
                    <a href="bpbj">
                        <i class="menu-icon fa fa-tag"></i>
                        <span class="menu-text"> 备品备件 </span>
                    </a>

                    <b class="arrow"></b>
                </li>
            </ul>
            <!-- /.nav-list -->
            
            <!-- #section:basics/sidebar.layout.minimize //适用于小屏幕设备？-->
            <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
                <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
            </div>
            <!-- /section:basics/sidebar.layout.minimize -->
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {}
            </script>         
  		</div>
  		<div class="main-content">
  		    <!-- breadcrumbs -->
  		    <div class="breadcrumbs" id="breadcrumbs">
  		  	    <script type="text/javascript">
  		  	       try{
  		  	    	   ace.setting.check('breadcrumbs','fixed')
  		  	       }catch(e){}
  		  	    </script>
  		  	    <ul class="breadcrumb">
  		  	        <li>
                        <i class="ace-icon fa fa-home home-icon"></i>
                        <a href="#">运行养护</a>
                    </li>
                    <li>
                    	<a href="#">养护维修</a>
                    </li>
                    <li class="active">
                    	备品备件
                    </li>
  		  	    </ul>
  		    </div>
  		    <!-- /breadcrumbs -->
  		    <div class="page-content">
  		    	<div class="row">
  		    		<div class="col-xs-12">
  		    		
  		    			<div style="margin-top:10px;">
  		    			<table id="device-gird"></table>
  		    			<div id="device-pager"></div>
  		    			</div>
  		    			
  		    			<script type="text/javascript">
							var $path_base = "..";//in Ace demo this will be used for editurl parameter
  		    			</script>
  		    		</div>
  		    	</div>
  		    </div>
  		    <!-- /page-content -->
  		</div>
  		<!-- /main-content -->
  	</div>
  	<!-- /main-container -->
  	
  	<!-- scripts -->
  	
  	<!--[if !IE]>
    <script type="text/javascript">
        window.jQuery || document.write("<script src='${contextPath}/resources/assets/js/jquery.js'>" + "<" + "/script>");
    </script>
    <script src="${contextPath}/resources/js/ajaxfileupload.js"></script>
    <script type="text/javascript">
       var contextPath = '${contextPath}';
    </script>
    <![endif]-->
    
    <!--[if IE]>
	<script type="text/javascript">
	 window.jQuery || document.write("<script src='${contextPath}/resources/assets/js/jquery1x.js'>"+"<"+"/script>");
	</script>
	<![endif]-->
	<script type="text/javascript">
        if ('ontouchstart' in document.documentElement) document.write("<script src='${contextPath}/resources/assets/js/jquery.mobile.custom.js'>" + "<" + "/script>");
  	</script>
  	<script src="${contextPath}/resources/assets/js/bootstrap.js"></script>
    <script src="${contextPath}/resources/assets/js/date-time/bootstrap-datepicker.js"></script>
	<script src="${contextPath}/resources/assets/js/jqGrid/jquery.jqGrid.js"></script>
	<script src="${contextPath}/resources/assets/js/jqGrid/i18n/grid.locale-cn.js"></script>
	<script src="${contextPath}/resources/assets/js/jquery-ui.js"></scrip>

	<!-- page specific plugin scripts -->
    <script src="${contextPath}/resources/assets/js/ace/elements.scroller.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.colorpicker.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.fileinput.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.typeahead.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.wysiwyg.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.spinner.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.treeview.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.wizard.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/elements.aside.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.ajax-content.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.touch-drag.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.sidebar.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.sidebar-scroll-1.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.submenu-hover.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.widget-box.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.settings.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.settings-rtl.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.settings-skin.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.widget-on-reload.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.hover-dropdown.js"></script>
	<script src="${contextPath}/resources/assets/js/ace/ace.searchbox-autocomplete.js"></script>
	<script src="${contextPath}/resources/js/sbgl.js"></script>
	
	<script type="text/javascript">
    jQuery(function($) {
    	var grid_selector = "#device-gird";
		var pager_selector = "#device-pager";
		
		var parent_column = $(grid_selector).closest('[class*="col-"]');
		//resize to fit page size
		$(window).on('resize.jqGrid', function () {
			$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
	    })
		
		//resize on sidebar collapse/expand
		$(document).on('settings.ace.jqGrid' , function(ev, event_name, collapsed) {
			if( event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed' ) {
				//setTimeout is for webkit only to give time for DOM changes and then redraw!!!
				setTimeout(function() {
					$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
				}, 0);
			}
	    })
	    
	    jQuery(grid_selector).jqGrid({
	    	url:"loadOperationSpare",
			datatype: "json",
			height: 358,
			colNames:['id','备件编号','备件名称', '规格型号', '配件类型', '当前库存','单价','总价','单位','生产厂商','存放位置','关键字'],
			colModel:[
						{name:'id',index:'id',editable:true,hidden:true},
						{name:'spareCode',index:'spareCode',width:150,editable: true,search:false},
						{name:'spareName',index:'spareName',width:180,editable: true,search:false},
						{name:'spareModel',index:'spareModel',width:200,editable: true,search:false},
						{name:'spareType',index:'spareType',width:150,editable: true,search:false},
						{name:'spareCount',index:'spareCount',width:130,editable:true,search:false},
						{name:'sparePrice',index:'sparePrice',width:150,editable: true,search:false},
						{name:'sparePriceTotal',index:'sparePriceTotal',width:150,editable: true,search:false},
						{name:'spareUnit',index:'spareUnit',width:130,editable: true,search:false},
						{name:'providerName',index:'providerName',width:200,editable: true,search:false},
						{name:'location',index:'location',width:180,editable: true,search:false},
						{name:'keywords',index:'keywords',hidden:true,search:true,searchoptions:{searchhidden:true,sopt:['eq']}}
					], 
			
					viewrecords : true,
					rowNum:10,
					rowList:[10,20,30],
					pager : pager_selector,
					altRows: true,
					//toppager: true,
					
					multiselect: true,
					//multikey: "ctrlKey",
			        multiboxonly: true,
			
					loadComplete : function() {
						var table = this;
						setTimeout(function(){
							styleCheckbox(table);
							
							updateActionIcons(table);
							updatePagerIcons(table);
							enableTooltips(table);
						}, 0);
					},
			
					editurl: "operationSpareEdit",//nothing is savedw
					caption: "备品备件清单"
			
					//,autowidth: true,
			
			
					/**
					,
					grouping:true, 
					groupingView : { 
						 groupField : ['name'],
						 groupDataSorted : true,
						 plusicon : 'fa fa-chevron-down bigger-110',
						 minusicon : 'fa fa-chevron-up bigger-110'
					},
					caption: "Grouping"
					*/
			
				});
				$(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size
				
				function aceSwitch( cellvalue, options, cell ) {
					setTimeout(function(){
						$(cell) .find('input[type=checkbox]')
							.addClass('ace ace-switch ace-switch-5')
							.after('<span class="lbl"></span>');
					}, 0);
				}
				//enable datepicker
				function pickDate( cellvalue, options, cell ) {
					setTimeout(function(){
						$(cell) .find('input[type=text]')
								.datepicker({format:'yyyy-mm-dd HH:MM:ss' , autoclose:true}); 
					}, 0);
				}
				
				jQuery(grid_selector).jqGrid('navGrid',pager_selector,
						{ 	//navbar options
							edit: true,
							editicon : 'ace-icon fa fa-pencil blue',
							add: true,
							addicon : 'ace-icon fa fa-plus-circle purple',
							del: true,
							delicon : 'ace-icon fa fa-trash-o red',
							search: true,
							searchicon : 'ace-icon fa fa-search orange',
							refresh: true,
							refreshicon : 'ace-icon fa fa-refresh green',
							view: true,
							viewicon : 'ace-icon fa fa-search-plus grey',
						},
						{
							//edit record form
							//closeAfterEdit: true,
							//width: 700,
							drag:false,
							closeAfterEdit:true,
							recreateForm: true,
							beforeShowForm : function(e) {
								var form = $(e[0]);
								form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
								style_edit_form(form);
								enabledrag(form);
							}
						},
						{
							//new record form
							//width: 700,
							drag:false,
							closeAfterAdd: true,
							recreateForm: true,
							viewPagerButtons: false,
							beforeShowForm : function(e) {
								var form = $(e[0]);
								form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar')
								.wrapInner('<div class="widget-header" />')
								style_edit_form(form);
								enabledrag(form);
							}
						},
						{
							//delete record form
							drag:false,
							recreateForm: true,
							beforeShowForm : function(e) {
								var form = $(e[0]);
								if(form.data('styled')) return false;
								
								form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
								style_delete_form(form);
								enabledrag(form);
								form.data('styled', true);
							},
							onClick : function(e) {
								//alert(1);
							}
						},
						{
							//search form
							drag:false,
							recreateForm: true,
							afterShowSearch: function(e){
								var form = $(e[0]);
								form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
								style_search_form(form);
								enabledrag(form);
							},
							afterRedraw: function(){
								style_search_filters($(this));
							}
							,
							multipleSearch: false,
							/**
							multipleGroup:true,
							showQuery: true
							*/
						},
						{
							//view record form
							drag:false,
							recreateForm: true,
							beforeShowForm: function(e){
								
								var form = $(e[0]);
								enabledrag(form);
								form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
							}
						}
					)
				
				
					
					function style_edit_form(form) {
								   //don't wrap inside a label element, the checkbox value won't be submitted (POST'ed)
								  //.addClass('ace ace-switch ace-switch-5').wrap('<label class="inline" />').after('<span class="lbl"></span>');
				        
								
						//update buttons classes
						var buttons = form.next().find('.EditButton .fm-button');
						buttons.addClass('btn btn-sm').find('[class*="-icon"]').hide();//ui-icon, s-icon
						buttons.eq(0).addClass('btn-primary').prepend('<i class="ace-icon fa fa-check"></i>');
						buttons.eq(1).prepend('<i class="ace-icon fa fa-times"></i>')
						
						buttons = form.next().find('.navButton a');
						buttons.find('.ui-icon').hide();
						buttons.eq(0).append('<i class="ace-icon fa fa-chevron-left"></i>');
						buttons.eq(1).append('<i class="ace-icon fa fa-chevron-right"></i>');		
					}
				
					function style_delete_form(form) {
						var buttons = form.next().find('.EditButton .fm-button');
						buttons.addClass('btn btn-sm btn-white btn-round').find('[class*="-icon"]').hide();//ui-icon, s-icon
						buttons.eq(0).addClass('btn-danger').prepend('<i class="ace-icon fa fa-trash-o"></i>');
						buttons.eq(1).addClass('btn-default').prepend('<i class="ace-icon fa fa-times"></i>')
					}
					
					function style_search_filters(form) {
						form.find('.delete-rule').val('X');
						form.find('.add-rule').addClass('btn btn-xs btn-primary');
						form.find('.add-group').addClass('btn btn-xs btn-success');
						form.find('.delete-group').addClass('btn btn-xs btn-danger');
					}
					function style_search_form(form) {
						var dialog = form.closest('.ui-jqdialog');
						var buttons = dialog.find('.EditTable')
						buttons.find('.EditButton a[id*="_reset"]').addClass('btn btn-sm btn-info').find('.ui-icon').attr('class', 'ace-icon fa fa-retweet');
						buttons.find('.EditButton a[id*="_query"]').addClass('btn btn-sm btn-inverse').find('.ui-icon').attr('class', 'ace-icon fa fa-comment-o');
						buttons.find('.EditButton a[id*="_search"]').addClass('btn btn-sm btn-purple').find('.ui-icon').attr('class', 'ace-icon fa fa-search');
					}
					
					function beforeDeleteCallback(e) {
						var form = $(e[0]);
						if(form.data('styled')) return false;
						
						form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
						style_delete_form(form);
						
						form.data('styled', true);
					}
					
					function beforeEditCallback(e) {
						var form = $(e[0]);
						form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
						style_edit_form(form);
					}
				
				
				
					//it causes some flicker when reloading or navigating grid
					//it may be possible to have some custom formatter to do this as the grid is being created to prevent this
					//or go back to default browser checkbox styles for the grid
					function styleCheckbox(table) {
					/**
						$(table).find('input:checkbox').addClass('ace')
						.wrap('<label />')
						.after('<span class="lbl align-top" />')
				
				
						$('.ui-jqgrid-labels th[id*="_cb"]:first-child')
						.find('input.cbox[type=checkbox]').addClass('ace')
						.wrap('<label />').after('<span class="lbl align-top" />');
					*/
					}
					
				
					//unlike navButtons icons, action icons in rows seem to be hard-coded
					//you can change them like this in here if you want
					function updateActionIcons(table) {
						/**
						var replacement = 
						{
							'ui-ace-icon fa fa-pencil' : 'ace-icon fa fa-pencil blue',
							'ui-ace-icon fa fa-trash-o' : 'ace-icon fa fa-trash-o red',
							'ui-icon-disk' : 'ace-icon fa fa-check green',
							'ui-icon-cancel' : 'ace-icon fa fa-times red'
						};
						$(table).find('.ui-pg-div span.ui-icon').each(function(){
							var icon = $(this);
							var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
							if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
						})
						*/
					}
					
					//replace icons with FontAwesome icons like above
					function updatePagerIcons(table) {
						var replacement = 
						{
							'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140',
							'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140',
							'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140',
							'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140'
						};
						$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function(){
							var icon = $(this);
							var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
							
							if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
						})
					}
				
					function enableTooltips(table) {
						$('.navtable .ui-pg-button').tooltip({container:'body'});
						$(table).find('.ui-pg-div').tooltip({container:'body'});
					}
					
					//var selr = jQuery(grid_selector).jqGrid('getGridParam','selrow');
				
					$(document).one('ajaxloadstart.page', function(e) {
						$.jgrid.gridDestroy(grid_selector);
						$('.ui-jqdialog').remove();
					});
					
					function enabledrag(form){
						var dialog=form.closest('.ui-jqdialog');
						dialog.css('left',600).draggable();
					}
    });
    
    </script>
  </body>
</html>
